from django.contrib import admin

# Register your models here.
import xadmin
from django_xadmin import models

from xadmin import views

class GlobalSetting(object):
    # 设置后天顶部标题
    site_title = '我是后台管理'
    # 设置后台底部标题
    site_footer = '我是底部信息'
    # 设置菜单可折叠
    menu_style = 'accordion'
xadmin.site.register(views.CommAdminView,GlobalSetting)


# 注册博客表到后台管理
xadmin.site.register(models.Article)


class BaseSetting(object):
    # 启用主题管理器
    enable_themes = True
    # 使用主题
    use_bootswatch = True
    # 注册主题设置
xadmin.site.register(views.BaseAdminView, BaseSetting)
